+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
+Fri Oct 2 16:10:36 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtktypeutils.c (gtk_type_enum_find_value): make sure we don't
+ segfault when looking up a non-existant value name (reported by
+ Pablo <pcj+gtk@primenet.com>).
+
Thu Oct 1 10:40:20 1998 Tim Janik <timj@gtk.org>
* gtk/gtkclist.h (gtk_clist_prepend):
GtkEnumValue *vals;
vals = gtk_type_enum_get_values (enum_type);
- while (vals)
- {
- if (strcmp (vals->value_name, value_name) == 0 ||
- strcmp (vals->value_nick, value_name) == 0)
- return vals;
- vals++;
- }
+ if (vals)
+ while (vals->value_name)
+ {
+ if (strcmp (vals->value_name, value_name) == 0 ||
+ strcmp (vals->value_nick, value_name) == 0)
+ return vals;
+ vals++;
+ }
}
else
g_warning ("gtk_type_enum_find_value(): type `%s' is not derived from `GtkEnum' or `GtkFlags'",
gtk_type_name (enum_type));
-
+
return NULL;
}